﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using NUnit.Framework;
using DecisionFramework.Text;

namespace DecisionFramework.Logging.Internal
{
    [TestFixture]
   	public class CreateLogUtil
	{
		public static void AddSource(string source, string log)
		{
			try
			{
				EventLog.CreateEventSource(source, log);
			}
			catch (Exception e)
			{
				Console.WriteLine("Could not write to event viewer=" + source + "; exception=" + e);
			}
		}

        [Test]
		public void CreateEventLog()
		{
            AddSource(TextHelper.UpTo("Company", 8), "Company");
		}
	}
}
 
